LD_FLAGS=-std=c++17 -lpthread -DDEBUG

all: httpserver test_cgi
httpserver:Main.cc Socket.cc Protocol.cc
	g++ $^ -o $@ $(LD_FLAGS)
test_cgi:TestCGI.cc Protocol.cc
	g++ $^ -o ./webroot/cgi/$@ -std=c++17

.PHONY:clean release
clean:
	rm -rf httpserver ./webroot/cgi/test_cgi release

release:
	mkdir release
	cp ./httpserver release
	cp -r ./webroot ./release

# 定义变量和使用变量 a=b $(a)